#!/usr/bin/node

const argv = process.argv,
      log=console.log;

//validate argv
//1 argv number equal 3  小于三
if(argv.length!==3){
  log('cmd exit-code');
  process.exit(1);
}
//code type is number
if(isNaN(Number(argv[2]))){
  log('argv must be nmber');
  process.exit(2);
}

//code range >0 命令行参数大于0
if(Number(argv[2])<0){
  log('argv must >0');
  process.exit(3);
}
process.exit(argv[2]);
